/**
 * 
 */
package com.kingdee.eas.xbang.task.ui.itface;

import java.util.HashMap;
import java.util.Map;

import com.kingdee.eas.xbang.task.ui.TimeConsumingUI;

/**
 * @author david
 * 
 */
public class AbstractWebServiceImpl implements ICommonWebServices {

	private String url, method, nameSpace, userName, passWord;

	public static final String parameterKey = "parameters_key";

	protected Map<String, Object> parameters = new HashMap<String, Object>();

	protected Object[] parameters_ = new Object[] {};

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.kingdee.eas.xbang.task.ui.itface.ICommonWebServices#initParameters(java.util.Map)
	 */
	public void initParameters(Map parameters) {

	}

	public void setParameters_(Object[] parameters_) {
		this.parameters_ = parameters_;
	}

	public Object[] getParameters_() {
		return parameters_;
	}

	public Object[] getWebServiceParameters() {
		if (parameters.containsKey(parameterKey) && parameters.get(parameterKey) != null) {
			return (Object[]) parameters.get(parameterKey);
		}
		parameters_ = new Object[] {};
		return parameters_;
	}

	public static void test() {
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.kingdee.eas.xbang.task.ui.itface.ICommonWebServices#run(com.kingdee.eas.xbang.task.ui.TimeConsumingUI,
	 * java.util.Map)
	 */
	public void run(TimeConsumingUI timeConsumingUI, Map parametersEx) {
	}

	/**
	 * @return the url
	 */
	public String getUrl() {
		return url;
	}

	/**
	 * @param url
	 *            the url to set
	 */
	public void setUrl(String url) {
		this.url = url;
	}

	/**
	 * @return the method
	 */
	public String getMethod() {
		return method;
	}

	/**
	 * @param method
	 *            the method to set
	 */
	public void setMethod(String method) {
		this.method = method;
	}

	/**
	 * @return the nameSpace
	 */
	public String getNameSpace() {
		return nameSpace;
	}

	/**
	 * @see com.kingdee.eas.xbang.task.ui.itface.ICommonWebServices#setNameSpace(java.lang.String)
	 */
	public void setNameSpace(String nameSpace) {
		this.nameSpace = nameSpace;
	}

	/**
	 * @return the userName
	 */
	public String getUserName() {
		return userName;
	}

	/**
	 * @param userName
	 *            the userName to set
	 */
	public void setUserName(String userName) {
		this.userName = userName;
	}

	/**
	 * @return the passWord
	 */
	public String getPassWord() {
		return passWord;
	}

	/**
	 * @param passWord
	 *            the passWord to set
	 */
	public void setPassWord(String passWord) {
		this.passWord = passWord;
	}

}
